Matthias Clasen [Fri, 17 Apr 2020 03:25:06 +0000 (23:25 -0400)]
scrolledwindow: Drop shadow-type
We were only using this as a boolean, so change it
to a boolean property named has-frame.
Matthias Clasen [Fri, 17 Apr 2020 03:26:35 +0000 (23:26 -0400)]
scrolledwindow: Document the .frame style class
Matthias Clasen [Fri, 17 Apr 2020 14:12:20 +0000 (14:12 +0000)]
Merge branch 'assorted-menu-fixes' into 'master'
Assorted menu fixes
See merge request GNOME/gtk!1704
Timm Bäder [Fri, 17 Apr 2020 06:14:34 +0000 (08:14 +0200)]
snapshot: Avoid a save/restore pair if we can
Timm Bäder [Fri, 17 Apr 2020 05:37:22 +0000 (07:37 +0200)]
label: Ignore setting attrs from NULL to NULL
Timm Bäder [Fri, 17 Apr 2020 05:27:21 +0000 (07:27 +0200)]
text: unconditionally unref attr list
pango_attr_list_unref() works on NULL
Timm Bäder [Fri, 17 Apr 2020 05:23:15 +0000 (07:23 +0200)]
text: Avoid creating a PangoAttrList we don't need
It's going to be empty, unless we have preedit_attrs
Timm Bäder [Fri, 17 Apr 2020 04:55:00 +0000 (06:55 +0200)]
meson: Use summary()
Instead of doing our own. Bumps the dependency to 0.53 though.
Timm Bäder [Fri, 17 Apr 2020 04:53:23 +0000 (06:53 +0200)]
meson: Trivial formattting
Timm Bäder [Tue, 14 Apr 2020 13:22:52 +0000 (15:22 +0200)]
label: Redraw when text attrs are affected by css change
GtkWidget doesn't do it automatically and probably shouldn't
Timm Bäder [Tue, 14 Apr 2020 09:11:23 +0000 (11:11 +0200)]
label: Don't create an unnecessary attribute list
Timm Bäder [Tue, 14 Apr 2020 09:11:08 +0000 (11:11 +0200)]
label: Only parse mnemonic attributes if we need to
Timm Bäder [Tue, 14 Apr 2020 08:53:48 +0000 (10:53 +0200)]
label: Ignore AFFECTS_ATTRS css changes if we can
It's only interesting if we either already have attributes, or the new
style adds some.
Timm Bäder [Tue, 14 Apr 2020 07:20:00 +0000 (09:20 +0200)]
label: Inline function into only caller
Timm Bäder [Mon, 13 Apr 2020 06:57:36 +0000 (08:57 +0200)]
label: Remove some unused quarks
Timm Bäder [Mon, 13 Apr 2020 06:56:33 +0000 (08:56 +0200)]
label: Remove priv pointer
Timm Bäder [Mon, 13 Apr 2020 06:23:32 +0000 (08:23 +0200)]
label: Stop connecting to notify::gtk-enable-accels
Leftover from when GtkAccelLabel was a GtkLabel subclass. GtkAccelLabel
connects to this itself these days though.
Timm Bäder [Sun, 12 Apr 2020 17:54:20 +0000 (19:54 +0200)]
label: Set underline text and markup in one step
Try to unify the way we parse the mnemonic character
Timm Bäder [Sun, 12 Apr 2020 12:54:54 +0000 (14:54 +0200)]
label: Fold set_pattern_internal into only caller
Timm Bäder [Sun, 12 Apr 2020 09:17:46 +0000 (11:17 +0200)]
adwaita: don't extent %link in linkbuttons
We already do that for the label inside the button.
Timm Bäder [Sun, 12 Apr 2020 09:05:28 +0000 (11:05 +0200)]
label: Remove GtkLabel:track-visited-links
Always track visited state of links. This way all visited links in all
labels look the same. Whether the theme wants to style :visited is the
theme's business.
Timm Bäder [Sun, 12 Apr 2020 08:40:21 +0000 (10:40 +0200)]
label: Remove a11y-only properties
Update them manually instead.
Timm Bäder [Sun, 12 Apr 2020 08:07:15 +0000 (10:07 +0200)]
label: Fold function into only caller
This makes it more obvious that gtk_label_setup_mnemonic() depends on
the root of the widget and it therefore makes sense to call it in
::root/::unroot.
Timm Bäder [Sun, 12 Apr 2020 08:04:30 +0000 (10:04 +0200)]
label: Don't normalize booleans in internal setters
We almost always pass a literal TRUE/FALSE to them.
Timm Bäder [Sun, 12 Apr 2020 07:46:03 +0000 (09:46 +0200)]
stylecontext: Remove get_pango_attributes
Make the only caller use GtkCssNode API.
Timm Bäder [Sun, 12 Apr 2020 07:22:38 +0000 (09:22 +0200)]
cssstyle: Only create PangoAttrList if there are attribtues
Don't allocate a new GString if we never need it and therefore don't
create the PangoAttrList if we have no attributes anyway. Update callers
to handle the possible NULL return value.
Timm Bäder [Sun, 12 Apr 2020 07:07:57 +0000 (09:07 +0200)]
label: Pull all pango attributes from the theme
Dont' force an underline attribute here. Just ask the theme for the
text-decoration.
Timm Bäder [Sun, 12 Apr 2020 06:38:34 +0000 (08:38 +0200)]
label: Fix an old TODO comment
Timm Bäder [Sun, 12 Apr 2020 06:36:36 +0000 (08:36 +0200)]
modelbutton: Emit ::clicked() before closing the popover
The clicked handler might still need the popover.
Timm Bäder [Sun, 12 Apr 2020 05:58:09 +0000 (07:58 +0200)]
label: Remove public pattern API
Timm Bäder [Fri, 10 Apr 2020 14:35:15 +0000 (16:35 +0200)]
label: Shorten set_markup_internal a bit
Timm Bäder [Fri, 10 Apr 2020 14:33:12 +0000 (16:33 +0200)]
label: Avoid duplicating a string
We only use str_for_accel if with_uline is TRUE.
Timm Bäder [Fri, 10 Apr 2020 14:29:32 +0000 (16:29 +0200)]
label: Pass <markup> length directly when parsing markup
Timm Bäder [Fri, 10 Apr 2020 14:23:32 +0000 (16:23 +0200)]
label: Remove a double if (needs_root) check
The code is clearer and shorter this way.
Timm Bäder [Fri, 10 Apr 2020 14:16:02 +0000 (16:16 +0200)]
label: Use widget API to add style class
Timm Bäder [Fri, 10 Apr 2020 14:04:20 +0000 (16:04 +0200)]
label: Clear select info before creating a new one
E.g. set_markup_internal will create a new select_info, but then we were
destroying it again, just to recreate it later.
Timm Bäder [Fri, 10 Apr 2020 14:03:37 +0000 (16:03 +0200)]
label: Save a few LOC
Timm Bäder [Fri, 10 Apr 2020 13:41:56 +0000 (15:41 +0200)]
label: Save links in an array
Stop using GList for this.
Timm Bäder [Fri, 10 Apr 2020 07:55:18 +0000 (09:55 +0200)]
widget: Return an array from list_devices
To forther reduce the GList usage in the code base.
Timm Bäder [Fri, 10 Apr 2020 07:54:02 +0000 (09:54 +0200)]
accelgroup: Restructure gtk_accelerator_name
To fix invalid reads and make the function a bit shorter while we're at
it.
Fixes #2602
Timm Bäder [Fri, 10 Apr 2020 06:17:46 +0000 (08:17 +0200)]
main: Stop using GList when propagating events
There are still some cases missing.
Matthias Clasen [Fri, 17 Apr 2020 13:07:17 +0000 (09:07 -0400)]
widget-factory: Use a model for the complex menu
We had the model already in the ui file, but weren't
using it.
Matthias Clasen [Fri, 17 Apr 2020 13:04:26 +0000 (09:04 -0400)]
modelbutton: Don't show accels without text
We don't want to show accelerators in iconic buttons.
Matthias Clasen [Fri, 17 Apr 2020 12:55:56 +0000 (08:55 -0400)]
widget-factory: Catch errors
This speeds up the debugging when doing quick experimental
changes to widget-factory.ui.
Matthias Clasen [Fri, 17 Apr 2020 12:37:45 +0000 (08:37 -0400)]
inspector: Fix a crash
Don't crash while picking. The event signal broke
when GdkEvent was turned into a type instance,
since the automatic marshallers don't know how to
deal with that. Manually set the right marshaller.
Matthias Clasen [Thu, 16 Apr 2020 20:36:24 +0000 (20:36 +0000)]
Merge branch 'event-types' into 'master'
Rework event types
Closes #2585
See merge request GNOME/gtk!1702
Emmanuele Bassi [Thu, 16 Apr 2020 16:23:36 +0000 (17:23 +0100)]
Restructure the GdkEvent type hierarchy
GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
using a union of sub-types. This has always been problematic when it
comes to implementing accessor functions: either you get generic API
that takes a GdkEvent and uses a massive switch() to determine which
event types have the data you're looking for; or you create namespaced
accessors, but break language bindings horribly, as boxed types cannot
have derived types.
The recent conversion of GskRenderNode (which had similar issues) to
GTypeInstance, and the fact that GdkEvent is now a completely opaque
type, provide us with the chance of moving GdkEvent to GTypeInstance,
and have sub-types for GdkEvent.
The change from boxed type to GTypeInstance is pretty small, all things
considered, but ends up cascading to a larger commit, as we still have
backends and code in GTK trying to access GdkEvent structures directly.
Additionally, the naming of the public getter functions requires
renaming all the data structures to conform to the namespace/type-name
pattern.
Emmanuele Bassi [Thu, 16 Apr 2020 18:07:02 +0000 (19:07 +0100)]
Fix annotations for GtkEventController
Emmanuele Bassi [Thu, 16 Apr 2020 18:06:04 +0000 (19:06 +0100)]
Fix annotation for gtk_show_uri_full()
The callback is now an asynchronous closure.
Emmanuele Bassi [Thu, 16 Apr 2020 15:37:41 +0000 (16:37 +0100)]
Fix compiler warning
Newer versions of GCC are fairly aggressive with NULL checks.
Matthias Clasen [Thu, 16 Apr 2020 18:05:19 +0000 (18:05 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
themes: Fix HighContrast dependencies
See merge request GNOME/gtk!1701
Matthias Clasen [Thu, 16 Apr 2020 18:01:29 +0000 (18:01 +0000)]
Merge branch 'css-focus-changes' into 'master'
Add a focus-within state
See merge request GNOME/gtk!1700
Matthias Clasen [Thu, 16 Apr 2020 16:40:37 +0000 (12:40 -0400)]
themes: Fix HighContrast dependencies
HighContrast themes now depend on sass files from Adwaita.
Matthias Clasen [Thu, 16 Apr 2020 12:30:29 +0000 (08:30 -0400)]
Adwaita: Some adjustments for :focus-within
Use :focus-within for focus in entries, since the
actual focus is on the text within, and :focus for
notebooks, since we don't want to draw an outline
around the notebook when the focus is in content.
Matthias Clasen [Thu, 16 Apr 2020 16:09:54 +0000 (12:09 -0400)]
testsuite: Add some checks for focus states
This is some opportunistic checking in a test that
is really about focus chains, but better than nothing.
Matthias Clasen [Thu, 16 Apr 2020 05:36:13 +0000 (01:36 -0400)]
Add a focus-within state
This is used for widgets that contain the focus widget,
reserving the focused state for the focus location itself.
This aligns our focus state handling with
https://www.w3.org/TR/selectors-4/
Matthias Clasen [Thu, 16 Apr 2020 15:43:47 +0000 (15:43 +0000)]
Merge branch 'monitor-signals-x11' into 'master'
x11: emit ::enter/leave-monitor
See merge request GNOME/gtk!1699
Olivier Fourdan [Thu, 16 Apr 2020 10:58:39 +0000 (12:58 +0200)]
x11: emit ::enter/leave-monitor
For the X11 backend, keep a list of monitors for which the surface
intersects the monitor area.
Whenever the X11 surface is configured, check against the list of
monitors to determine whether it enters a new monitor or if it left a
monitor, to emit the corresponding ::enter/leave-monitor signals just
like a Wayland compositor would.
As monitors can be added, removed or reconfigured at any time, redo
those checks whenever any of these events occur.
Matthias Clasen [Thu, 16 Apr 2020 03:14:34 +0000 (23:14 -0400)]
Add :focus-visible to css docs
Matthias Clasen [Thu, 16 Apr 2020 03:09:36 +0000 (23:09 -0400)]
css: use :focus-visible instead of :focus(visible)
This is aligning our language with
https://www.w3.org/TR/selectors-4/
Matthias Clasen [Wed, 15 Apr 2020 22:26:25 +0000 (22:26 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
window: Don't set is-active twice
See merge request GNOME/gtk!1698
Matthias Clasen [Wed, 15 Apr 2020 21:08:15 +0000 (17:08 -0400)]
window: Don't set is-active twice
We are listening to focus change events for this
no need to duplicate the work in ::state-changed.
Matthias Clasen [Wed, 15 Apr 2020 19:28:32 +0000 (19:28 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #2612
See merge request GNOME/gtk!1695
Matthias Clasen [Wed, 15 Apr 2020 19:19:21 +0000 (15:19 -0400)]
Updates to NEWS
Matthias Clasen [Wed, 15 Apr 2020 18:56:32 +0000 (14:56 -0400)]
Move key event rewriting
Stop rewriting key and focus events on the GDK side.
Instead deliver them as they are, and propagate them
from the root on the gtk side, in gtkmain.c. And
stop complaining about focus events on popups - we
can just ignore them if we have no use for them.
Matthias Clasen [Wed, 15 Apr 2020 18:43:00 +0000 (14:43 -0400)]
window: Fix setting :is-active
We want to listen to focus events from the windowing
system here, relying on crossing events for this doesn't
work.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2612
Matthias Clasen [Wed, 15 Apr 2020 18:36:04 +0000 (14:36 -0400)]
eventcontroller: Fix signal marshallers
GdkEvent is no longer a GObject. Any signals taking
events as arguments need to have their marshallers
fixed. Thankfully, we have few of these left.
Jakub Steiner [Wed, 15 Apr 2020 17:21:32 +0000 (17:21 +0000)]
Merge branch 'wip/jimmac/drop-text-shadow' into 'master'
Adwaita: drop text shadows for buttons
Closes #2280
See merge request GNOME/gtk!1693
Jakub Steiner [Wed, 15 Apr 2020 13:27:17 +0000 (15:27 +0200)]
Adwaita: drop text shadows for buttons
- People seem to misunderstand the unsharp-mask-like increase
of visual contrast for "fuziness". That is not the reason for
the change. The stylistic change of just going with flat
text label allows to simplify the code and drop complexity.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2280
Matthias Clasen [Wed, 15 Apr 2020 16:23:14 +0000 (16:23 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1694
Jakub Steiner [Wed, 15 Apr 2020 15:47:14 +0000 (15:47 +0000)]
Merge branch 'wip/jimmac/checkradio-focus' into 'master'
Adwaita: check & radio focus ring
See merge request GNOME/gtk!1690
Jakub Steiner [Wed, 15 Apr 2020 15:47:09 +0000 (15:47 +0000)]
Merge branch 'wip/jimmac/active-state-for-checkradios' into 'master'
Adwaita: fix active state for radios & checkboxes
Closes #2493
See merge request GNOME/gtk!1689
Jakub Steiner [Wed, 15 Apr 2020 15:45:05 +0000 (15:45 +0000)]
Merge branch 'wip/jimmac/levelbar-punch' into 'master'
Adwaita: no edge highlight
Closes #2494
See merge request GNOME/gtk!1691
Matthias Clasen [Wed, 15 Apr 2020 15:36:09 +0000 (11:36 -0400)]
widget-factory: Add menu style class in popovers
We have a hand-rolled popover menu on page 3 that looks
really bad right now. Adding the menu style class makes
it all better.
Jakub Steiner [Wed, 15 Apr 2020 15:35:32 +0000 (15:35 +0000)]
Merge branch 'wip/jimmac/treeview-borders' into 'master'
Adwaita: slightly increase contrast for treeview borders
Closes #2238
See merge request GNOME/gtk!1692
Jakub Steiner [Wed, 15 Apr 2020 12:53:19 +0000 (14:53 +0200)]
Adwaita: slightly increase contrast for treeview borders
- sligtly increase contrast for the treeview borders
- FIXME: High Contrast seems to drop the borders completely,
there might be some trickery for using border-left-color and
border-top-color this way as even forcing the color 'red' seems
to render invisible on HC.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2238
Matthias Clasen [Wed, 15 Apr 2020 12:07:48 +0000 (08:07 -0400)]
docs: Small revision of input handling overview
Remove a vestigial touch events section.
Jakub Steiner [Wed, 15 Apr 2020 11:56:12 +0000 (13:56 +0200)]
Adwaita: no edge highlight
- Levelbars and progressbars are indicators, not controls. They don't
need no affordance signifier. Make it flat!
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2494
Jakub Steiner [Wed, 15 Apr 2020 11:45:59 +0000 (13:45 +0200)]
Adwaita: check & radio focus ring
- this slipped through Frederik's patch
Jakub Steiner [Wed, 15 Apr 2020 11:34:41 +0000 (13:34 +0200)]
Adwaita: fix active state for radios & checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2493
Matthias Clasen [Wed, 15 Apr 2020 05:34:03 +0000 (05:34 +0000)]
Merge branch 'emoji-keynav' into 'master'
Emoji keynav
See merge request GNOME/gtk!1687
Matthias Clasen [Tue, 14 Apr 2020 19:27:34 +0000 (19:27 +0000)]
Merge branch 'arnaudb/fix-typo' into 'master'
Fix typo in IconTheme.
See merge request GNOME/gtk!1686
Matthias Clasen [Tue, 14 Apr 2020 12:40:08 +0000 (08:40 -0400)]
emojichooser: link sections for keynav
Make Up/Down jump between sections in the Emoji grid.
Matthias Clasen [Tue, 14 Apr 2020 19:03:57 +0000 (15:03 -0400)]
flowbox: Add a private api to disable move-cursor
Without this, it seems impossible to make cross-section
keynav in the Emoji chooser work. I've tried, but got
lost between the focus, grab_focus, move_cursor and
keynav-failed vfuncs and signals, and their competing
implementations GtkFlowBox and GtkEmojiChooser.
Matthias Clasen [Tue, 14 Apr 2020 17:29:49 +0000 (13:29 -0400)]
flowbox: Remove can-focus handling
With the new meaning of can-focus, this doesn't make
sense anymore.
Arnaud Bonatti [Tue, 14 Apr 2020 18:43:02 +0000 (20:43 +0200)]
Fix typo in IconTheme.
The add_search_path() method was
using the resource_path property
in place of the search_path one.
Matthias Clasen [Tue, 14 Apr 2020 01:44:09 +0000 (21:44 -0400)]
emojichooser: Improve keynav, again
When the focus is moved to one of the Emoji children,
scroll it into view.
Matthias Clasen [Tue, 14 Apr 2020 01:43:27 +0000 (21:43 -0400)]
emojichooser: Improve keynav
Add an action to scroll to the next or previous section,
and bind it to Ctrl-n/Ctrl-p.
Emin Tufan Çetin [Tue, 14 Apr 2020 16:09:12 +0000 (16:09 +0000)]
Update Turkish translation
Sabri Ünal [Tue, 14 Apr 2020 16:01:18 +0000 (16:01 +0000)]
Update Turkish translation
Matthias Clasen [Tue, 14 Apr 2020 14:07:54 +0000 (14:07 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1685
Matthias Clasen [Tue, 14 Apr 2020 14:00:42 +0000 (14:00 +0000)]
Merge branch 'library-versioning' into 'master'
build: Prepare library versioning
See merge request GNOME/gtk!1684
Matthias Clasen [Tue, 14 Apr 2020 13:15:31 +0000 (09:15 -0400)]
build: Prepare library versioning
Set version and soversion separately for the library.
When we do the 4.0 release, we will set:
gtk_soversion = '1'
gtk_library_version = '1.0.0'
See https://gitlab.gnome.org/GNOME/gtk/-/issues/1963
Matthias Clasen [Mon, 13 Apr 2020 23:24:13 +0000 (19:24 -0400)]
appchooserwidget: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 23:17:11 +0000 (19:17 -0400)]
lockbutton: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 22:19:55 +0000 (18:19 -0400)]
expander: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 22:10:22 +0000 (18:10 -0400)]
colorswatch: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 23:25:55 +0000 (23:25 +0000)]
Merge branch 'wip/matthiasc/monitor-signals' into 'master'
Add enter/leave signals for monitors
See merge request GNOME/gtk!1680
Matthias Clasen [Mon, 13 Apr 2020 23:21:57 +0000 (23:21 +0000)]
Merge branch 'use-gtk-doc-for-gtk4' into 'master'
Use gtk-doc from the gtk-doc-for-gtk4 branch
See merge request GNOME/gtk!1683
Matthias Clasen [Mon, 13 Apr 2020 20:40:57 +0000 (16:40 -0400)]
Always use gtk-doc as a subproject for now
We need the support for actions syntax, among
other things.